package com.zhongkun.datahome.web.rest;

import com.zhongkun.datahome.common.annotation.Log;
import com.zhongkun.datahome.common.core.domain.R;
import com.zhongkun.datahome.common.enums.BusinessType;
import com.zhongkun.datahome.service.req.IdsBody;
import com.zhongkun.datahome.service.req.cmd.room.MaterialRoomCmd;
import com.zhongkun.datahome.service.res.material.HouseMaterialRoomVo;
import com.zhongkun.datahome.service.res.room.MaterialRoomVo;
import com.zhongkun.datahome.service.service.IMaterialRoomService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author: lifengsheng
 * @Date: 2025/4/23 10:51
 * @Desc
 */
@Api("材料空间管理")
@RestController
@RequestMapping("/core/room")
public class MaterialRoomController {
    @Resource
    private IMaterialRoomService materialRoomService;

//    @ApiOperation("查询空间列表")
//    @PreAuthorize("@ss.hasPermi('core:room:list')")
//    @GetMapping("/list")
//    public R<List<MaterialRoomVo>> listRoom(String relationType, Long relationId) {
//        return R.ok(materialRoomService.listRoom(relationType, relationId));
//    }

//    @ApiOperation("新增空间")
//    @PreAuthorize("@ss.hasPermi('core:room:add')")
//    @Log(title = "材料空间", businessType = BusinessType.INSERT)
//    @PostMapping("/add")
//    public R<Long> add(@RequestBody MaterialRoomCmd cmd) {
//        return R.ok(materialRoomService.add(cmd));
//    }

//    @ApiOperation("删除空间")
//    @PreAuthorize("@ss.hasPermi('core:room:remove')")
//    @Log(title = "材料空间", businessType = BusinessType.DELETE)
//    @DeleteMapping("/remove")
//    public R<Void> remove(@RequestBody IdsBody idsBody) {
//        materialRoomService.remove(idsBody.getIds());
//        return R.ok();
//    }
}
